package com.ruoyi.web.controller.order.mapper;

import com.ruoyi.common.core.dao.BaseMapper;
import com.ruoyi.common.entity.DO.order.ShopOrderDO;
import com.ruoyi.common.entity.VO.order.OrderExportVO;
import com.ruoyi.common.entity.VO.order.ShopOrderExportVO;
import com.ruoyi.common.entity.VO.order.ShopOrderSearchVO;
import com.ruoyi.common.entity.VO.order.ShopOrderVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;
import java.util.List;

public interface IBackOrderMapper extends BaseMapper<ShopOrderDO> {

    List<ShopOrderVO> searchList(ShopOrderSearchVO shopOrderSearchVO);

    List<ShopOrderExportVO> searchShopOrderExportList(ShopOrderSearchVO shopOrderSearchVO);

    List<OrderExportVO> searchOrderExportList(ShopOrderSearchVO shopOrderSearchVO);

    ShopOrderVO getDetailForPay(String orderSn);

    int countOrderCurrentMonth(@Param("shopId") Long shopId);

    int countOrderBetweenDay(@Param("startDay") String startDay, @Param("endDay") String endDay, @Param("shopId") Long shopId);

    BigDecimal countOrderBuyCostCurrentMonth(@Param("shopId") Long shopId);

    BigDecimal countOrderBuyCostBetweenDay(@Param("startDay") String startDay, @Param("endDay") String endDay, @Param("shopId") Long shopId);

    BigDecimal countOrderPayCostCurrentMonth(@Param("shopId") Long shopId);

    BigDecimal countOrderPayCostBetweenDay(@Param("startDay") String startDay, @Param("endDay") String endDay, @Param("shopId") Long shopId);

    BigDecimal countOrderProfitCurrentMonth(@Param("shopId") Long shopId);

    BigDecimal countOrderProfitBetweenDay(@Param("startDay") String startDay, @Param("endDay") String endDay, @Param("shopId") Long shopId);
}
